
import {lazy,Suspense}from 'react';
var Index=lazy(()=>import('../views/Index'))
var Login=lazy(()=>import('../views/Login'))
var Register=lazy(()=>import('../views/Register'))
var Detail=lazy(()=>import('../views/Detail'))
var City=lazy(()=>import('../views/City'))
var Search=lazy(()=>import('../views/Search'))
var SearchDetail=lazy(()=>import('../views/SearchDetail'))
var Recode=lazy(()=>import('../views/Rcode'))
var Rpassword=lazy(()=>import('../views/Rpassword'))
var Order=lazy(()=>import('../views/Order'))
var Address=lazy(()=>import('../views/Address'))
var Setup=lazy(()=>import('../views/Setup'))
var AddDetail=lazy(()=>import('../views/AddDetail'))
var Ordermanage=lazy(()=>import('../views/Ordermanage'))
//二级路由
var Indexx=lazy(()=>import('../views/Second/Indexx'))
var Cartt=lazy(()=>import('../views/Second/Cartt'))
var Mine=lazy(()=>import('../views/Second/Mine'))
var Shopcar=lazy(()=>import('../views/Second/Shopcar'))
var NotFound=lazy(()=>import('../views/NotFound'))

export default[
    {
        path:'/index',
        component:Index,
        children:[
            {
                path:'/index/indexx',
                component:Indexx
            },
            {
                path:'/index/cartt',
                component:Cartt
            },
            {
                path:'/index/shopcar',
                component:Shopcar
            },
            {
                path:'/index/mine',
                component:Mine
            },
            {
                from:'/',
                to:'/index',
            },
            {
                path:'*',
                component:NotFound,
            }
        ]
    },
    {
        path:'/register',
        component:Register,
    },
    {
        path:'/login',
        component:Login,
    },
    {
        path:'/detail',
        component:Detail,
    },
    {
        path:'/city',
        component:City,
    },
    {
        path:'/search',
        component:Search,
    },
    {
        path:'/searchdetail',
        component:SearchDetail,
    },
    {
        path:'/rcode',
        component:Recode,
    },
    {
        path:'/rpassword',
        component:Rpassword,
    },
    {
        path:'/order',
        component:Order,
    },
    {
        path:'/ordermanage',
        component:Ordermanage,
    },
    {
        path:'/address',
        component:Address,
    },
    {
        path:'/addDetail',
        component:AddDetail,
    },
    {
        path:'/setup',
        component:Setup,
    },
    {
        from:'/',
        to:'/index',
    },
    {
        path:'*',
        component:NotFound,
    }
   
]